﻿@model CultuRAM.Models.EventParticipant

@{
    ViewBag.Title = "Adicionar Novo Artista";
}

<h4>Adicionar Novo Artista</h4>
<br />
@using (Ajax.BeginForm("CreatePv", "EventParticipant", new AjaxOptions
{
    UpdateTargetId = "tabEventParRight",
    InsertionMode = InsertionMode.Replace,
    HttpMethod = "POST",
    OnSuccess = "UpdateEventPar(" + @Model.EventId + ")"
}))
{
    @*@Html.ValidationSummary(false)*@

    <fieldset>
        <legend>Artista</legend>
        
        @Html.HiddenFor(model => model.EventParticipantId)
        @Html.HiddenFor(model => model.EventId, new { id = "EventId" }) @*//NAO ALTERAR*@
                         
        <div class="control-group">
            @Html.LabelFor(model => model.Participant)
            <div class="controls">
                @Html.DropDownListFor(model => model.ParticipantId, (SelectList)ViewBag.Participants, "- Selecione -", new { id = "ParticipId"})
                @Html.HiddenFor(model => model.ParticipantId)
                @*@Html.ValidationMessageFor(model => model.Participant.ParticipId) *@     
            </div>
        </div>
        
        <div class="control-group">
            @Html.LabelFor(model => model.Obs)     
            <div class="controls">
                @Html.TextBoxFor(model => model.Obs, null, new {@style = "width: 510px !important;" })
                @*@Html.ValidationMessageFor(model => model.Title)*@
            </div>
        </div>

        <p>
            <button  type="submit" value="Guardar" class="btn btn-primary"><i class="icon-ok icon-white"></i> Guardar</button>
           
            @Html.Raw(@Ajax.ActionLink("replacetxt", "Default", null, new AjaxOptions()
                {
                    UpdateTargetId = "tabEventParRight",
                    InsertionMode = InsertionMode.Replace,
                    OnSuccess = "ParBgColorClear()",
                }, new { @class = "btn btn-default" })
		        .ToHtmlString().Replace("replacetxt", "<i class=\"icon-ban-circle\"></i> Cancelar"))
        </p>

    </fieldset>
    
}

@Scripts.Render("~/bundles/culturam")


